<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
* Menu Template Function
*
* Displays a menu in CSS-ready HTML
*
* @param string $name The menu name
* @param string $class CSS class(es) for the menu <ul> element
* @param string $id Element ID for the menu <ul> element
* @param string $show_sub_menus Either "no|yes|active".  "active" only displays the sub menu if it's parent menu
*								item is active, or a sibling is active
*
*
* @return string $menu
* 
*/
function smarty_function_menu ($params, $smarty) {
	$smarty->CI->load->library('menu');
	$html = '';
	if($params['type'] == 'main'){
		$smarty->CI->menu->parent_link('trang-chu','Trang Chủ',site_url());
		
		
		$smarty->CI->menu->parent_link('game-online','Game Online',site_url('games/game-online'));
		$smarty->CI->menu->parent_link('nhac-chuong','Nhạc chuông','http://nhacchuong.uizoi.com/');
		$smarty->CI->menu->parent_link('theme','Theme',create_url('theme',array('rewrite'=>true)));
//		$smarty->CI->menu->parent_link('nhac-cho','Nhạc chờ',create_url('nhac-cho',array('rewrite'=>true)));
		$smarty->CI->menu->parent_link('hinh-nen','Hình nền',create_url('hinh-nen',array('rewrite'=>true)));
//		$smarty->CI->menu->parent_link('video-clip','Video Clip',create_url('video-clip',array('rewrite'=>true)));
		$smarty->CI->menu->parent_link('hinh-dong','Hình động',create_url('hinh-dong',array('rewrite'=>true)));
		$smarty->CI->menu->parent_link('hinh-nen-iphone','Hình nền Iphone',create_url('hinh-nen-iphone',array('rewrite'=>true)));
		

		$html = $smarty->CI->menu->display();
	return $html;
	}
	
}